<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <!-- 页面meta -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <title>后台数据管理页</title>
    <meta name="description" content="后台数据管理页">
    <meta name="keywords" content="后台数据管理页">

    <meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport">

    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>

    <link rel="stylesheet" href="static/layui/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="static/layui/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="static/layui/ionicons/css/ionicons.min.css">
    <link rel="stylesheet" href="static/layui/iCheck/square/blue.css">
    <link rel="stylesheet" href="static/layui/morris/morris.css">
    <link rel="stylesheet" href="static/layui/jvectormap/jquery-jvectormap-1.2.2.css">
    <link rel="stylesheet" href="static/layui/datepicker/datepicker3.css">
    <link rel="stylesheet" href="static/layui/daterangepicker/daterangepicker.css">
    <link rel="stylesheet" href="static/layui/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">
    <link rel="stylesheet" href="static/layui/datatables/dataTables.bootstrap.css">
    <link rel="stylesheet" href="static/layui/treeTable/jquery.treetable.css">
    <link rel="stylesheet" href="static/layui/treeTable/jquery.treetable.theme.default.css">
    <link rel="stylesheet" href="static/layui/select2/select2.css">
    <link rel="stylesheet" href="static/layui/colorpicker/bootstrap-colorpicker.min.css">
    <link rel="stylesheet" href="static/layui/bootstrap-markdown/css/bootstrap-markdown.min.css">
    <link rel="stylesheet" href="static/layui/adminLTE/css/AdminLTE.css">
    <link rel="stylesheet" href="static/layui/adminLTE/css/skins/_all-skins.min.css">
    <link rel="stylesheet" href="static/css/style.css">
    <link rel="stylesheet" href="static/layui/ionslider/ion.rangeSlider.css">
    <link rel="stylesheet" href="static/layui/ionslider/ion.rangeSlider.skinNice.css">
    <link rel="stylesheet" href="static/layui/bootstrap-slider/slider.css">
    <link rel="stylesheet" href="static/layui/bootstrap-datetimepicker/bootstrap-datetimepicker.css">
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
    <header class="main-header">
        <!-- Logo -->
        <a href="/index" id="backTop" class="logo">
            <!-- logo for regular state and mobile devices -->
            <span class="logo-lg">A机构管理系统</span>
        </a>
        <!-- Header Navbar: style can be found in header.less -->
        <nav class="navbar navbar-static-top">
            <!-- Sidebar toggle button-->

            <div class="navbar-custom-menu">
                <ul class="nav navbar-nav">
                    <!-- Messages: style can be found in dropdown.less-->
                    <li class="dropdown messages-menu">
                    </li>

                    <!-- Notifications: style can be found in dropdown.less -->
                    <li class="dropdown notifications-menu">
                    </li>

                    <!-- Tasks: style can be found in dropdown.less -->
                    <li class="dropdown tasks-menu">
                    </li>

                    <!-- User Account: style can be found in dropdown.less -->
                    <li class="dropdown user user-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <img src="static/images/user0.jpg" class="user-image" alt="User Image">
                            <span class="hidden-xs">${sysUser.username!''}</span>
                        </a>
                        <ul class="dropdown-menu">
                            <li><a href="/exit">退出登录</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </nav>
    </header>

    <!-- 导航侧栏 -->
    <aside class="main-sidebar">
        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">

            <!-- sidebar menu: : style can be found in sidebar.less -->
            <ul class="sidebar-menu">
                <li class="treeview">
                    <a href="/index">
                        <span>首页</span>
                    </a>
                </li>
                <li class="treeview">
                    <a href="#">
                        <span>数据管理</span>
                        <span class="pull-right-container">
                        <i class="fa fa-angle-left pull-right"></i>
                        </span>
                    </a>
                    <ul class="treeview-menu">
                        <li class="carDataUp">
                            <a href="/carData">
                                <span>车辆上传信息管理</span>
                            </a>
                        </li>
                        <li class="carDataUp">
                            <a href="/command">
                                <span>口令管理</span>
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="treeview">
                    <a href="#">
                        <span>记录管理</span>
                        <span class="pull-right-container">
                        <i class="fa fa-angle-left pull-right"></i>
                        </span>
                    </a>
                    <ul class="treeview-menu">
                        <li class="carDataUp">
                            <a href="/upRecord">
                                <span>上传记录</span>
                            </a>
                        </li>
                        <li class="carDataUp">
                            <a href="/delRecord">
                                <span>车辆信息操作记录</span>
                            </a>
                        </li>
                    </ul>
                </li>
            </ul>
        </section>
        <!-- /.sidebar -->
    </aside>
    <!-- 导航侧栏 /-->

    <!-- 内容区域 -->
    <!-- @@master = admin-layout.html-->
    <!-- @@block = content -->

    <div class="content-wrapper">
        <!-- 内容头部 -->
        <section class="content-header">
            <h1>
                数据上传
            </h1>
            <!--<ol class="breadcrumb">
                <li><a href="carDataUp.html">首页</a></li>
                <li><a href="#">数据主页</a></li>
            </ol>-->
        </section>
        <!-- 内容头部 /-->

        <!-- 正文区域 -->
        <section class="content">
            <#if (isDataUp!'')='upInfo'>
            <div id="upInfo" style="border: #ccc 1px solid;width: 300px;height: 200px;position: fixed;top: 30%;left:40%;z-index: 1000;background-color: #ccc;border-radius: 20px;">
                <div style="position: absolute;top: 50%;right: 25%;">${info!''}</div>
                <div style="position: absolute;top: 5%;right: 5%;" onclick="closeUpInfo();">关闭</div>
            </div>
            </#if>
            <!-- .box-body -->
            <div class="box box-primary">
                <div class="box-header with-border">
                    <form class="navbar-form navbar-right" role="search" method="post" action="/index?func=select">
                        <div class="form-group">
                            <label class="sr-only" for="queryColor">上传情况</label>
                            <div class="input-group">
                                <div class="input-group-addon">上传情况</div>
                                <select class="form-control" name="state" id="queryColor" style="width: 110px">
                                    <option value="100">--请选择--</option>
                                    <option value="0">未上传</option>
                                    <option value="1">已上传</option>
                                    <option value="2">已修改</option>
                                    <option value="3">上传失败</option>
                                </select>
                            </div>
                        </div>
                        <button type="submit" class="btn btn-default" id="searchBtn">
                            <span class="glyphicon glyphicon-search" aria-label="搜索"></span>
                        </button>
                    </form>
                </div>

                <div class="box-body">

                    <!-- 数据表格 -->
                    <div class="table-box">

                        <form action="/carDataUp" method="post">
                        <!--数据列表-->
                        <table id="dataList" class="table table-bordered table-striped table-hover dataTable">
                            <thead>
                            <tr>
                                <th class="" style="padding-right:0px;">
                                    <input id="selall" type="checkbox" class="icheckbox_square-blue">
                                </th>
                                <th class="id">ID</th>
                                <th class="enTime">入口时间</th>
                                <th class="enTollStationName">入口名称</th>
                                <th class="exTime">出口时间</th>
                                <th class="exTollStationName">出口名称</th>
                                <th class="vehicleId">车牌号码_颜色</th>
                                <th class="vehicleType">车辆类型</th>
                                <th class="fee">总交易金额</th>
                                <th class="upTime">上次操作时间</th>
                                <th class="text-center">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <#list carDataList as carData>
                            <tr>
                                <td><input name="id" type="checkbox" value="${carData.id}"></td>
                                <td>${carData.id}</td>
                                <td>${carData.enTime?string('yyyy.MM.dd HH:mm:ss')}</td>
                                <td>${carData.enTollStationName}</td>
                                <td>${carData.exTime?string('yyyy.MM.dd HH:mm:ss')}</td>
                                <td>${carData.exTollStationName}</td>
                                <td>${carData.vehicleId}</td>
                                <td>${carData.vehicleType}</td>
                                <td>${carData.fee}</td>
                                <td>${carData.upTime?string('yyyy.MM.dd HH:mm:ss')}</td>
                                <td class="text-center">
                                    <#if carData.state=='0'>
                                        <a href="/carDataUp?id=${carData.id}"><button type="button" class="btn btn-info btn-xs">${carData.desc}</button></a>
                                    <#elseif carData.state=='1'>
                                        <button type="button" class="btn btn-success btn-xs disabled">${carData.desc}</button>
                                    <#elseif carData.state=='2'>
                                        <a href="/carDataUp?id=${carData.id}"><button type="button" class="btn btn-warning btn-xs">${carData.desc}</button></a>
                                    <#else>
                                        <a href="/carDataUp?id=${carData.id}"><button type="button" class="btn btn-danger btn-xs">${carData.desc}</button></a>
                                    </#if>
                                </td>
                            </tr>
                            </#list>
                            </tbody>

                        </table>
                        <!--数据列表/-->
                        <!--工具栏-->
                        <div class="pull-left" style="top: 20px;position: absolute;left: 5%;">
                            <div class="form-group form-inline">
                                <div class="btn-group">
                                   <button type="submit" class="btn btn-default" title="新增数据">批量上传</button>
                                </div>
                            </div>
                        </div>
                        </form>
                        <!--工具栏/-->
                    </div>
                    <!-- 数据表格 /-->
                </div>
                <!-- /.box-body -->
            </div>

        </section>
        <!-- 正文区域 /-->
    </div>
    <!-- 底部导航 -->
    <a href="#backTop" style="position: fixed;right: 10%;bottom: 10%;"><button type="button" class="btn btn-default" style="background-color: #222d32;color: white;" title="回顶">回顶</button></a>
    <footer class="main-footer">
        <div class="hidden-xs" >
            <strong>A机构管理系统2022</strong>
        </div>
    </footer>
    <!-- 底部导航 /-->

</div>

<script src="static/layui/jQuery/jquery-2.2.3.min.js"></script>
<script src="static/layui/jQueryUI/jquery-ui.min.js"></script>
<script>
    $.widget.bridge('uibutton', $.ui.button);
</script>
<script src="static/layui/bootstrap/js/bootstrap.min.js"></script>
<script src="static/layui/raphael/raphael-min.js"></script>
<script src="static/layui/morris/morris.min.js"></script>
<script src="static/layui/sparkline/jquery.sparkline.min.js"></script>
<script src="static/layui/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
<script src="static/layui/jvectormap/jquery-jvectormap-world-mill-en.js"></script>
<script src="static/layui/knob/jquery.knob.js"></script>
<script src="static/layui/daterangepicker/moment.min.js"></script>
<script src="static/layui/daterangepicker/daterangepicker.js"></script>
<script src="static/layui/daterangepicker/daterangepicker.zh-CN.js"></script>
<script src="static/layui/datepicker/bootstrap-datepicker.js"></script>
<script src="static/layui/datepicker/locales/bootstrap-datepicker.zh-CN.js"></script>
<script src="static/layui/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script>
<script src="static/layui/slimScroll/jquery.slimscroll.min.js"></script>
<script src="static/layui/fastclick/fastclick.js"></script>
<script src="static/layui/iCheck/icheck.min.js"></script>
<script src="static/layui/adminLTE/js/app.min.js"></script>
<script src="static/layui/treeTable/jquery.treetable.js"></script>
<script src="static/layui/select2/select2.full.min.js"></script>
<script src="static/layui/colorpicker/bootstrap-colorpicker.min.js"></script>
<script src="static/layui/bootstrap-wysihtml5/bootstrap-wysihtml5.zh-CN.js"></script>
<script src="static/layui/bootstrap-markdown/js/bootstrap-markdown.js"></script>
<script src="static/layui/bootstrap-markdown/locale/bootstrap-markdown.zh.js"></script>
<script src="static/layui/bootstrap-markdown/js/markdown.js"></script>
<script src="static/layui/bootstrap-markdown/js/to-markdown.js"></script>
<script src="static/layui/ckeditor/ckeditor.js"></script>
<script src="static/layui/input-mask/jquery.inputmask.js"></script>
<script src="static/layui/input-mask/jquery.inputmask.date.extensions.js"></script>
<script src="static/layui/input-mask/jquery.inputmask.extensions.js"></script>
<script src="static/layui/datatables/jquery.dataTables.min.js"></script>
<script src="static/layui/datatables/dataTables.bootstrap.min.js"></script>
<script src="static/layui/chartjs/Chart.min.js"></script>
<script src="static/layui/flot/jquery.flot.min.js"></script>
<script src="static/layui/flot/jquery.flot.resize.min.js"></script>
<script src="static/layui/flot/jquery.flot.pie.min.js"></script>
<script src="static/layui/flot/jquery.flot.categories.min.js"></script>
<script src="static/layui/ionslider/ion.rangeSlider.min.js"></script>
<script src="static/layui/bootstrap-slider/bootstrap-slider.js"></script>
<script src="static/layui/bootstrap-datetimepicker/bootstrap-datetimepicker.js"></script>
<script src="static/layui/bootstrap-datetimepicker/locales/bootstrap-datetimepicker.zh-CN.js"></script>
<script>
    function closeUpInfo() {
        document.getElementById("upInfo").style.display="none";
    }
    $(document).ready(function() {
        // 选择框
        $(".select2").select2();

        // WYSIHTML5编辑器
        $(".textarea").wysihtml5({
            locale: 'zh-CN'
        });
    });


    // 设置激活菜单
    function setSidebarActive(tagUri) {
        var liObj = $("#" + tagUri);
        if (liObj.length > 0) {
            liObj.parent().parent().addClass("active");
            liObj.addClass("active");
        }
    }


    $(document).ready(function() {

        // 激活导航位置
        setSidebarActive("admin-datalist");

        // 列表按钮
        $("#dataList td input[type='checkbox']").iCheck({
            checkboxClass: 'icheckbox_square-blue',
            increaseArea: '20%'
        });
        // 全选操作
        $("#selall").click(function() {
            var clicks = $(this).is(':checked');
            if (!clicks) {
                $("#dataList td input[type='checkbox']").iCheck("uncheck");
            } else {
                $("#dataList td input[type='checkbox']").iCheck("check");
            }
            $(this).data("clicks", !clicks);
        });

    });
    //点击查询按钮，重载表格
    /*$('#searchBtn').on('click', function() {
        table.reload('tableAll', {
            method : 'post',
            where : {
                queryColor : $('#queryColor').val(),
                queryType : $('#queryType').val()
            },
            page : {
                curr : 1
            }
        });
        return false;
    });
*/
</script>
</body>
</html>